home *** CD-ROM | disk | FTP | other *** search
- Path: news.cac.psu.edu!psuvm!f0o
- Organization: Penn State University
- Date: Thu, 1 Feb 1996 16:45:31 EST
- From: Tim Benner <F0O@psuvm.psu.edu>
- Message-ID: <96032.164531F0O@psuvm.psu.edu>
- Newsgroups: comp.lang.c++
- Subject: template problem in BC++ 3.0
-
- The linker is telling me it can't find the name of a template function
- I write when the template function is in another file. If the template
- function and the line which calls the template function are in the same
- program, I have no problem.
- Below is how the code looks:
-
- ====File temp.h=====
- template <class T> newmax(T x, T y);
-
- ====file temp.cpp====
- template <class T> newmax(T x, T y)
- {
- ...function body...
- }
-
- ===main program===
- result = newmax(5, 3);
-
- This is roughly how things look. The linker tells me it can't find
- a name for newmax.
-
- [Tim]
-